package com.sz.admin.browsehistory.pojo.po;

import com.mybatisflex.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.io.Serial;
import com.sz.mysql.EntityChangeListener;

/**
* <p>
* 用户浏览历史
* </p>
*
* @author sz-admin
* @since 2025-06-30
*/
@Data
@Table(value = "browse_history", onInsert = EntityChangeListener.class, onUpdate = EntityChangeListener.class)
@Schema(description = "用户浏览历史")
public class BrowseHistory implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @Schema(description ="历史记录ID（初次浏览时间6位yy-mm-dd + 用户ID12位 + 序列号12位）")
    private String historyId;

    @Schema(description ="用户ID")
    private String userId;

    @Schema(description ="帖子ID")
    private String postId;

    @Schema(description ="浏览次数")
    private Integer viewTimes;

    @Schema(description ="最长浏览时间（秒）")
    private Integer maxDuration;

    @Schema(description ="总计浏览时间（秒）")
    private Integer totalDuration;

    @Schema(description ="最后浏览时间 (格式: yy-mm-dd:hh-mm-ss)")
    private String lastViewTime;

    @Schema(description ="创建时间 (格式: yy-mm-dd:hh-mm-ss)")
    private String createdAt;

    @Schema(description ="更新时间 (格式: yy-mm-dd:hh-mm-ss)")
    private String updatedAt;

    @Schema(description ="")
    private Integer isDeleted;

}